<!DOCTYPE html>

<html>
<head>

<title> Fast courrier</title>

<style>

*{
   margin: 0px;
   padding: 0px;
}

body{

background-color:#E0E0E0  ;
}

#div2{
width:300px;
height:200px;
float:left;
margin-top:100px;
margin-left:400px;
border:2px solid black;
}
</style>

<script>
function validateForm()
{
var x=document.forms["myForm"]["User"].value;
if (x==null || x=="")
  {
  alert("NO name has been introduced");
  return false;
  }
else if(x=="Grosan Radu" || x=="Claudiu Isac" || x=="Alex Paun" || x=="Admin"){
       // alert("Accepted User");
		if(x=="Admin"){
		   document.forms["myForm"].action="http://localhost:8080/TIMISOARARoadRunner/admin.html";
		} else {
	       document.forms["myForm"].action="http://localhost:8080/TIMISOARARoadRunner/interfata.html";
		}
      }
   else {
    alert("Unidentified User");
	  return false;
} 
}
</script>

</head>

<body>

<!-- Sectiunea cu login-->
	<div id="div2">
	<br/>
		<p style="text-indent:20px;"><strong> Login user:<strong></p>		
		<br/>
		
		<!-- Form pentru logare -->
			
			<form   style="margin-left:50px;"
				    name="myForm";
					onsubmit="return validateForm()" 
					method="post"
			>
				User:   	<br><input type="text" name="User" ><br>
				Password:   <br><input type="password" name="pwd"><br>
				<br>																								
				<input type="submit" value="Login" >	
		
			</form>
			
 
	</div>
</body>

</html>